home *** CD-ROM | disk | FTP | other *** search
/ Dominator 4 / Dominator 4.iso / golf / lib / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-27  |  1.5 KB  |  81 lines

  1. #include <dos.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include "basics.h"
  5. #include "midi.h"
  6. #include "digi.h"
  7.  
  8. /****************************************************************************/
  9.  
  10. char    *backscr;
  11. char    game_palette[256][3];
  12. char    exitstr[1024];
  13.  
  14. char    last_fname[128];
  15. long    last_flen;
  16. int    last_error;
  17. int    last_fmode;
  18. int    last_handle = 0;
  19. int    last_memsize = 0;
  20.  
  21. short    scrxsize = 320;            //either 288*224 or 320*200
  22. short    scrysize = 200;
  23.  
  24. word    mouse_buttons = 0;
  25.  
  26. char    *block_addr = NULL;
  27. char    *map_addr = NULL;
  28.  
  29. char    curdrive = 'C';
  30.  
  31. CFIG    config = {0,11,11,0,1,2,0,0,0,0,0x388,0x220,1,5,5,0x220,1,5,0};
  32.  
  33. /****************************************************************************/
  34.  
  35. void
  36. main(void)
  37. {
  38.     int n;
  39.  
  40.     if (n = setup())
  41.         getout(n);
  42.  
  43.     while (get_key());
  44.  
  45.     for(;;keydata->last_key = get_key())
  46.         {
  47.         ifkey(K_ESC)
  48.             break;
  49.  
  50.  
  51.         copysource = backscr;     // copy screen over
  52.         copydest = (char *)MCGA_RAM;
  53.         dump_screen();
  54.  
  55.         copydest = backscr;        // clear back screen
  56.         clr_screen();
  57.  
  58.         read_mouse();
  59.         read_joy();
  60.  
  61.         print(0, 0, "Shell up and running.");
  62.         print(0, 8, "Mouse x = %d, y = %d",mx ,my);
  63.         print(0, 16, "Joy x = %d, y = %d, fire = %d",joy1_x ,joy1_y, joy1_fire);
  64.  
  65.         }
  66.  
  67.     getout(E_OK);
  68. }
  69.  
  70. /****************************************************************************/
  71.  
  72. void
  73. clear_keyb(void)
  74. {
  75.     while (get_key());
  76.     return;
  77. }
  78.  
  79. /****************************************************************************/
  80.  
  81.